﻿@using CMSMVC4.MultiResource
@model CMSMVC4.Areas.Admin.Models.ThemTaiKhoan

@{
    ViewBag.Title = @Admin.Account;
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

<script type="text/javascript" src="~/Scripts/jquery.validate.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.validate.unobtrusive.js"></script>
<script language="javascript" type="text/javascript">
    function getrole() {
        var role = "";
        $("#Quyen_chzn .chzn-choices .search-choice").each(function (i) {
            if (i > 0) {
                role += ','+$(this).text();
            } else {
                role += $(this).text();
            }
        });
        $("#Roles").val(role);
        $("#form").submit();
    }
</script>
<div class="row-fluid">
    <div class="span7" style="width: 100%">
        <div class="box paint color_14">
            <div class="title">
                <h4><span>@Admin.AddAccount</span> </h4>
            </div>
            <div class="content" style="width: 65%">
                @using (Html.BeginForm("Them", "QuanLyTaiKhoan", FormMethod.Post, new { id="form", @class = "form-horizontal cmxform", autocomplete = "off" }))
                {
                    @Html.ValidationSummary(true)
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.AccountName (*)<span class="help-block">@Admin.AccountName</span> </label>
                        <div class="controls span7">
                            <input type="text" value="@Model.Account"  class="span12" name="Account"/>
                            @Html.ValidationMessageFor(x => x.Account)
                        </div>
                    </div>
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.Password<span class="help-block">@Admin.Password</span> </label>
                        <div class="controls span7">
                            <input type="password" value="@Model.Pass"  class="span12" name="Pass"/>
                            @Html.ValidationMessageFor(x => x.Pass)
                        </div>
                    </div>
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.ConfirmPassword<span class="help-block">@Admin.ConfirmPassword</span> </label>
                        <div class="controls span7">
                            <input type="password" value="@Model.Repass"  class="span12" name="RePass"/>
                            @Html.ValidationMessageFor(x => x.Repass)
                        </div>
                    </div>
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3">@Admin.Email<span class="help-block">@Admin.EmailMess</span> </label>
                        <div class="controls span7">
                            <input type="text" value="@Model.Email"  class="span12" name="Email"/>
                            @Html.ValidationMessageFor(x => x.Email)
                        </div>
                    </div>
                    <div class="form-row control-group row-fluid">
                        <label class="control-label span3" for="inputEmail">@Admin.Role <span class="help-block">@Admin.Role</span></label>
                        <div class="controls span7">
                            <select data-placeholder="Choose a Country" class="chzn-select" multiple="" tabindex="3" id="Quyen">
                                <option value="Background">Background</option>
                                <option value="Baner">Baner</option>
                                <option value="Comment">Comment</option>
                                <option value="Contact">Contact</option>
                                <option value="Partner">Partner</option>
                                <option value="Equipment">Equipment</option>
                                <option value="Feedback">Feedback</option>
                                <option value="Introduce">Introduce</option>
                                <option value="Menu">Menu</option>
                                <option value="New">New</option>
                                <option value="Account">Account</option>
                                <option value="Service">Service</option>
                                <option value="Slideshow">Slideshow</option>
                                <option value="SupportOnline">SupportOnline</option>
                                <option value="Admin">Admin</option>
                            </select>
                            @Html.HiddenFor(x=>x.Roles)
                            @Html.ValidationMessageFor(x => x.Roles)
                        </div>
                    </div>
                    <div class="form-actions row-fluid">
                        <div class="span7 offset3">
                            <button type="button" onclick="getrole()" class="btn btn-primary">@Admin.SaveChange</button>
                        </div>
                    </div>

                }
            </div>
        </div>
    </div>
</div>




